//
//  ProductCell.m
//  DaDaLiCai
//
//  Created by user on 15/11/10.
//  Copyright © 2015年 Mikeshihua. All rights reserved.
//
#import "ProductCell.h"
#import "CustomView.h"

@implementation ProductCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        _productTitle = [[UILabel alloc]initWithFrame:CGRectMake(16, 8, SCREEN_WIDTH - 110 - 42, 20)];
        _productTitle.font = [UIFont systemFontOfSize:15];
        _productTitle.textColor = [UIColor hexStringToColor:@"#5A5A5A"];
        [self addSubview:_productTitle];
        
        _productNumberLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 16 - 110 , 8, 110, 20)];
        _productNumberLabel.textAlignment = NSTextAlignmentRight;
        _productNumberLabel.font = [UIFont systemFontOfSize:15];
        _productNumberLabel.textColor = [UIColor hexStringToColor:@"#5A5A5A"];
        [self addSubview:_productNumberLabel];
        
        _advanceView = [[CustomView alloc]initWithFrame:CGRectMake(0, 36, (SCREEN_WIDTH)/4.0, 40)];
        [self addSubview:_advanceView];
        
        _timeView = [[CustomView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH)/4.0, 36, (SCREEN_WIDTH)/4.0, 40)];
        [self addSubview:_timeView];
        
        _statusView = [[CustomView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH)/2.0, 36, (SCREEN_WIDTH)/4.0, 40)];
        [self addSubview:_statusView];
        
        _accessView = [[CustomView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH)*3/4.0, 36, (SCREEN_WIDTH)/4.0, 40)];
        [self addSubview:_accessView];
        
        UIView * lineView1 = [[UIView alloc]initWithFrame:CGRectMake(16+(SCREEN_WIDTH-32)/4.0, 36, 0.5, 40)];
        lineView1.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineView1];
        
        UIView * lineView2 = [[UIView alloc]initWithFrame:CGRectMake(16+(SCREEN_WIDTH-32)/2.0, 36, 0.5, 40)];
        lineView2.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineView2];
        
        UIView * lineView3 = [[UIView alloc]initWithFrame:CGRectMake(16+(SCREEN_WIDTH-32)*3/4.0, 36, 0.5, 40)];
        lineView3.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineView3];
        
        UIView * lineView4 = [[UIView alloc]initWithFrame:CGRectMake(0, 83.5, SCREEN_WIDTH, 0.5)];
        lineView4.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineView4];
    }
    return self;
}
@end
